package it.sebsibenal.server;

import java.net.URL;

import com.google.gdata.client.GoogleService;
import com.google.gdata.client.docs.DocsService;
import com.google.gdata.data.docs.DocumentListEntry;
import com.google.gdata.data.docs.DocumentListFeed;

public class TestGData {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {

		
		
		GoogleService myService = new GoogleService("docs", "folk-project-1");
		myService.setUserCredentials("sebsibenal@gmail.com", "s3bs1b3nal");
		
		DocsService service = new DocsService("folk-project");
		service.setUserCredentials("sebsibenal@gmail.com", "s3bs1b3nal");
		
		URL documentListFeedUrl = new URL("http://docs.google.com/feeds/documents/private/full");
		
		DocumentListFeed feed = service.getFeed(documentListFeedUrl, DocumentListFeed.class);
		
		for (DocumentListEntry	entry : feed.getEntries()) {
			System.out.println(entry.getTitle());
		}
		
	}

}
